<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>寄生组合式继承</title>
</head>
<body>
<script>
    function SuperType() {
        console.log('superType')
    }

    function SubType() {
        SuperType.call(this, arguments)
    }
    SubType.prototype = Object.create(SubType.prototype);
    SubType.prototype.constructor = SubType;

    var sub1 = new SubType();
    var sub2 = new SubType();
</script>
</body>
</html>
